Description
This manual connection member function requests an event from the connected collector. If there is a collected event available then it is opened and TRUE returned. If there are no collected events available, and the collector's reentrancy has not been exceeded (see Object Reentrancy) then the collector will start a new collection sequence. If the collection completes within the specified timeout then TRUE will be returned, otherwise FALSE will be returned. Before reading this topic, we would recommend familiarity with Manual Connections and Collectors.
Prototype
Uns WaitEvent( Uns timeout );
Parameters
timeout
This parameter determines whether the connection will poll or block (see Connection Timeout). It can be set to poll (CLP_POLL), block (CLP_WAIT) or a millisecond timeout.
Return Value
This function returns logical TRUE if an event is successfully retrieved within the timeout period; or FALSE otherwise.
Notes
If an event is successfully retrieved then it can be inspected using the following member functions;
Status()
This member function returns the connection's event status. Following a successful request the function will return CLP_EVENT_OPEN. If the request timed out it will return CLP_EVENT_TIMED_OUT.
IsOpen()
This member function returns TRUE if the connection is 'Open' or FALSE otherwise.
EventNum()
This member function returns the retrieved event's sequence number. Numbering starts from zero (the first retrieved event).
NumLinks()
This member function returns the number of links (connections) owned by the collector's consuming face.